package com.kgc.dao;

import com.kgc.domain.Account;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 接口dao
 */
@Repository
public interface AccountDao {

    //查询所有账户
    @Select("select * from account")
    public List<Account> findAll() throws Exception;

    //添加
    @Insert("insert into account (name,money) values (#{name},#{money})")
    public void saveAccount(Account account) throws Exception;
}
